package cn.net.isir.service;

import cn.net.isir.core.BasicService;
import cn.net.isir.core.SetBasicDao;
import cn.net.isir.dao.UserDao;
import cn.net.isir.entity.User;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService extends BasicService<User> {
    @SetBasicDao
    @Resource
    private UserDao userDao;

    /**
     * 查询当前用户的子用户
     *
     * @param orgIds      所属组织机构ID，多个id逗号分隔
     * @param username 子用户的用户登录名
     * @param pageNum  当前页码
     * @param pageSize 分页大小
     * @return 查询列表
     */
    public PageInfo selectSubUserPageList(String orgIds, String username, Integer pageNum, Integer pageSize) {
        return userDao.selectSubUserPageList(orgIds, username, pageNum, pageSize);
    }
}
